{% extends 'base.html' %}
{% block title_suffix %}
    | create page
{% endblock %}

{% block content %}
<div class="page-header">
	<h1>Edit Page <small>Change the Title or the Content</small></h1>
</div>

<form action="/page/edit_page/" method="post">
	{% csrf_token %}
	<label><strong>Title:</strong></label>
	<input type="text" name="title" value = "{{ page.title }}" placeholder="Title"></input>
	<label><strong>Content:</strong></label>
	<textarea class="ckeditor" name="editor">{{ page.content }}</textarea>
	<input type="hidden" name="id" value="{{ page.id }}">
	<div class="form-actions">
		<div class="pull-right">
			<a id="cancel" class="btn" href="{% url 'page.views.page' %}">Cancel</a>
			<button id="save" class="btn btn-primary" type="submit">Save Changes</button>
		</div>
	</div>
</form>


{% endblock %}

{% block scripts %}

<script type="text/javascript" src="/static/lib/ckeditor/ckeditor.js"></script>

{% endblock %}